package com.zzxy.spring12.service.impl;

import com.zzxy.spring12.dao.IUserSpringDao;
import com.zzxy.spring12.po.User;
import com.zzxy.spring12.service.IUserspringService;
import org.springframework.jdbc.core.JdbcTemplate;

public class UserSpringDaoImpl implements IUserSpringDao {
    private JdbcTemplate jdbcTemplate;

    public JdbcTemplate getJdbcTemplate() {
        return jdbcTemplate;
    }

    public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
        this.jdbcTemplate = jdbcTemplate;
    }

    @Override
    public int insert(User user) {
        return jdbcTemplate.update("insert into t_user values (null,?,?)",user.getUsername(),user.getPassword());
    }

    public void addUser(User user) {
    }
}
